package com.ruoyi.web.admin.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.admin.mapper.TdmFangShengTiaoJianMapper;
import com.ruoyi.web.admin.domain.TdmFangShengTiaoJian;
import com.ruoyi.web.admin.service.ITdmFangShengTiaoJianService;

/**
 * 仿生条件Service业务层处理
 * 
 * @author ly
 * @date 2022-03-11
 */
@Service
public class TdmFangShengTiaoJianServiceImpl implements ITdmFangShengTiaoJianService 
{
    @Autowired
    private TdmFangShengTiaoJianMapper tdmFangShengTiaoJianMapper;

    /**
     * 查询仿生条件
     * 
     * @param id 仿生条件主键
     * @return 仿生条件
     */
    @Override
    public TdmFangShengTiaoJian selectTdmFangShengTiaoJianById(Long id)
    {
        return tdmFangShengTiaoJianMapper.selectTdmFangShengTiaoJianById(id);
    }

    /**
     * 查询仿生条件列表
     * 
     * @param tdmFangShengTiaoJian 仿生条件
     * @return 仿生条件
     */
    @Override
    public List<TdmFangShengTiaoJian> selectTdmFangShengTiaoJianList(TdmFangShengTiaoJian tdmFangShengTiaoJian)
    {
        return tdmFangShengTiaoJianMapper.selectTdmFangShengTiaoJianList(tdmFangShengTiaoJian);
    }

    /**
     * 新增仿生条件
     * 
     * @param tdmFangShengTiaoJian 仿生条件
     * @return 结果
     */
    @Override
    public int insertTdmFangShengTiaoJian(TdmFangShengTiaoJian tdmFangShengTiaoJian)
    {
        tdmFangShengTiaoJian.setCreateTime(DateUtils.getNowDate());
        return tdmFangShengTiaoJianMapper.insertTdmFangShengTiaoJian(tdmFangShengTiaoJian);
    }

    /**
     * 修改仿生条件
     * 
     * @param tdmFangShengTiaoJian 仿生条件
     * @return 结果
     */
    @Override
    public int updateTdmFangShengTiaoJian(TdmFangShengTiaoJian tdmFangShengTiaoJian)
    {
        tdmFangShengTiaoJian.setUpdateTime(DateUtils.getNowDate());
        return tdmFangShengTiaoJianMapper.updateTdmFangShengTiaoJian(tdmFangShengTiaoJian);
    }

    /**
     * 批量删除仿生条件
     * 
     * @param ids 需要删除的仿生条件主键
     * @return 结果
     */
    @Override
    public int deleteTdmFangShengTiaoJianByIds(Long[] ids)
    {
        return tdmFangShengTiaoJianMapper.deleteTdmFangShengTiaoJianByIds(ids);
    }

    /**
     * 删除仿生条件信息
     * 
     * @param id 仿生条件主键
     * @return 结果
     */
    @Override
    public int deleteTdmFangShengTiaoJianById(Long id)
    {
        return tdmFangShengTiaoJianMapper.deleteTdmFangShengTiaoJianById(id);
    }
}
